<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>IgH EtherCAT Master: fsm_master.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">IgH EtherCAT Master
   &#160;<span id="projectnumber">1.5.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('fsm__master_8h_source.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">fsm_master.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="fsm__master_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/******************************************************************************</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *  $Id: fsm_master.h,v 06b53ebfa0c3 2012/12/06 13:06:10 fp $</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *  Copyright (C) 2006-2012  Florian Pose, Ingenieurgemeinschaft IgH</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *  This file is part of the IgH EtherCAT Master.</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *  The IgH EtherCAT Master is free software; you can redistribute it and/or</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *  modify it under the terms of the GNU General Public License version 2, as</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> *  published by the Free Software Foundation.</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *  The IgH EtherCAT Master is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> *  but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> *  Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> *  You should have received a copy of the GNU General Public License along</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> *  with the IgH EtherCAT Master; if not, write to the Free Software</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> *  ---</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> *  The license mentioned above concerns the source code only. Using the</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment"> *  EtherCAT technology and brand is only permitted in compliance with the</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment"> *  industrial property and similar rights of Beckhoff Automation GmbH.</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment"> *****************************************************************************/</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#ifndef __EC_FSM_MASTER_H__</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#define __EC_FSM_MASTER_H__</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="globals_8h.html">globals.h</a>&quot;</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="datagram_8h.html">datagram.h</a>&quot;</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="foe__request_8h.html">foe_request.h</a>&quot;</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="sdo__request_8h.html">sdo_request.h</a>&quot;</span></div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="soe__request_8h.html">soe_request.h</a>&quot;</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="fsm__slave__config_8h.html">fsm_slave_config.h</a>&quot;</span></div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="fsm__slave__scan_8h.html">fsm_slave_scan.h</a>&quot;</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="fsm__pdo_8h.html">fsm_pdo.h</a>&quot;</span></div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="structec__sii__write__request__t.html">   53</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>{</div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="structec__sii__write__request__t.html#a08c68d50c7e2fecfff3d1f54ede50b60">   54</a></span>&#160;    <span class="keyword">struct </span>list_head list; </div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="structec__sii__write__request__t.html#a1fb11a824ca776c9725157703c64a351">   55</a></span>&#160;    <a class="code" href="structec__slave.html">ec_slave_t</a> *<a class="code" href="structec__sii__write__request__t.html#a1fb11a824ca776c9725157703c64a351">slave</a>; </div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="structec__sii__write__request__t.html#a9b70af97dacc5056389bcde6ac1cf107">   56</a></span>&#160;    uint16_t <a class="code" href="structec__sii__write__request__t.html#a9b70af97dacc5056389bcde6ac1cf107">offset</a>; </div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="structec__sii__write__request__t.html#a98d3bd46058ea045c94f6f32d0b01d62">   57</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="structec__sii__write__request__t.html#a98d3bd46058ea045c94f6f32d0b01d62">nwords</a>; </div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="structec__sii__write__request__t.html#a8a435488d56415ece3c1c531bf9712bf">   58</a></span>&#160;    <span class="keyword">const</span> uint16_t *<a class="code" href="structec__sii__write__request__t.html#a8a435488d56415ece3c1c531bf9712bf">words</a>; </div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="structec__sii__write__request__t.html#a4751ad577cec3bff18f540147a8e7ca0">   59</a></span>&#160;    <a class="code" href="globals_8h.html#af8e216ffa0b8f5e3ee20edd4c17d6174">ec_internal_request_state_t</a> <a class="code" href="structec__sii__write__request__t.html#a4751ad577cec3bff18f540147a8e7ca0">state</a>; </div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;} <a class="code" href="structec__sii__write__request__t.html">ec_sii_write_request_t</a>;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="fsm__master_8h.html#a0d05c703de0dd2047ef9ae60d6822cdc">   64</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structec__fsm__master.html">ec_fsm_master</a> <a class="code" href="structec__fsm__master.html">ec_fsm_master_t</a>; </div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="structec__fsm__master.html">   68</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structec__fsm__master.html">ec_fsm_master</a> {</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#af5597239477f215c744aad387d7baa6b">   69</a></span>&#160;    <a class="code" href="structec__master.html">ec_master_t</a> *<a class="code" href="structec__fsm__master.html#af5597239477f215c744aad387d7baa6b">master</a>; </div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#a518334a40bb6eeea55081a997bbaebc2">   70</a></span>&#160;    <a class="code" href="structec__datagram__t.html">ec_datagram_t</a> *<a class="code" href="structec__fsm__master.html#a518334a40bb6eeea55081a997bbaebc2">datagram</a>; </div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#a6dea4cfd065a817b358441748378bd14">   71</a></span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structec__fsm__master.html#a6dea4cfd065a817b358441748378bd14">retries</a>; </div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#a2f5af7218647e9b14813f1033f8fc91a">   73</a></span>&#160;    void (*<a class="code" href="structec__fsm__master.html#a2f5af7218647e9b14813f1033f8fc91a">state</a>)(<a class="code" href="structec__fsm__master.html">ec_fsm_master_t</a> *); </div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#ab57f14b0c615bae6428ff89ef2cb7ef0">   74</a></span>&#160;    <a class="code" href="globals_8h.html#ad1a2101422888687598d7e1a630c6343">ec_device_index_t</a> <a class="code" href="structec__fsm__master.html#ab57f14b0c615bae6428ff89ef2cb7ef0">dev_idx</a>; </div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#aa06626b21389030366d7aed5f525c6c0">   76</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="structec__fsm__master.html#aa06626b21389030366d7aed5f525c6c0">idle</a>; </div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#acf6f1bd6e82f2947e181ed23f9d5f6f9">   77</a></span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="structec__fsm__master.html#acf6f1bd6e82f2947e181ed23f9d5f6f9">scan_jiffies</a>; </div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#a6b0de3d8e619c6937679b6e746dd3c1f">   78</a></span>&#160;    uint8_t <a class="code" href="structec__fsm__master.html#a6b0de3d8e619c6937679b6e746dd3c1f">link_state</a>[EC_MAX_NUM_DEVICES]; </div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#a0e6fafb6571a8c72ef75d37b335f168c">   80</a></span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structec__fsm__master.html#a0e6fafb6571a8c72ef75d37b335f168c">slaves_responding</a>[EC_MAX_NUM_DEVICES]; </div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#a173d3201cbfb35d29ff02788d7396839">   83</a></span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structec__fsm__master.html#a173d3201cbfb35d29ff02788d7396839">rescan_required</a>; </div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#a76906b5cbaec1d07e5881738a6ce008e">   84</a></span>&#160;    <a class="code" href="globals_8h.html#a0e9c38c7520909d649fac451046dcde0">ec_slave_state_t</a> <a class="code" href="structec__fsm__master.html#a76906b5cbaec1d07e5881738a6ce008e">slave_states</a>[EC_MAX_NUM_DEVICES]; </div><div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#aaa3d10bbf5af6278cec37fcd7b771372">   87</a></span>&#160;    <a class="code" href="structec__slave.html">ec_slave_t</a> *<a class="code" href="structec__fsm__master.html#aaa3d10bbf5af6278cec37fcd7b771372">slave</a>; </div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#a0e8413b9433f4223911da952e2e26a7a">   88</a></span>&#160;    <a class="code" href="structec__sii__write__request__t.html">ec_sii_write_request_t</a> *<a class="code" href="structec__fsm__master.html#a0e8413b9433f4223911da952e2e26a7a">sii_request</a>; </div><div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#ad9050cec0823e4e0f4ac34effddd8d21">   89</a></span>&#160;    off_t <a class="code" href="structec__fsm__master.html#ad9050cec0823e4e0f4ac34effddd8d21">sii_index</a>; </div><div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#a4d4e15f7b94cd12a63a7450db070840b">   90</a></span>&#160;    <a class="code" href="structec__sdo__request.html">ec_sdo_request_t</a> *<a class="code" href="structec__fsm__master.html#a4d4e15f7b94cd12a63a7450db070840b">sdo_request</a>; </div><div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#a2bc8d2dd67be1dbddac6c20190e3632c">   92</a></span>&#160;    <a class="code" href="structec__fsm__coe.html">ec_fsm_coe_t</a> <a class="code" href="structec__fsm__master.html#a2bc8d2dd67be1dbddac6c20190e3632c">fsm_coe</a>; </div><div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#acab91592f35788b01419702634765b86">   93</a></span>&#160;    <a class="code" href="structec__fsm__soe.html">ec_fsm_soe_t</a> <a class="code" href="structec__fsm__master.html#acab91592f35788b01419702634765b86">fsm_soe</a>; </div><div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#a93359faa0215a9448d5663a09f319372">   94</a></span>&#160;    <a class="code" href="structec__fsm__pdo.html">ec_fsm_pdo_t</a> <a class="code" href="structec__fsm__master.html#a93359faa0215a9448d5663a09f319372">fsm_pdo</a>; </div><div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#a64f30f383522a78b12151f803f39c552">   95</a></span>&#160;    <a class="code" href="structec__fsm__change.html">ec_fsm_change_t</a> <a class="code" href="structec__fsm__master.html#a64f30f383522a78b12151f803f39c552">fsm_change</a>; </div><div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#acd8d73f9c016a18c19eb120f8d691c62">   96</a></span>&#160;    <a class="code" href="structec__fsm__slave__config.html">ec_fsm_slave_config_t</a> <a class="code" href="structec__fsm__master.html#acd8d73f9c016a18c19eb120f8d691c62">fsm_slave_config</a>; </div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#aeac9947df44bf439f0e1f2b1c1b7b33f">   97</a></span>&#160;    <a class="code" href="structec__fsm__slave__scan.html">ec_fsm_slave_scan_t</a> <a class="code" href="structec__fsm__master.html#aeac9947df44bf439f0e1f2b1c1b7b33f">fsm_slave_scan</a>; </div><div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="structec__fsm__master.html#aeac629d016ca18930554d88646b1516f">   98</a></span>&#160;    <a class="code" href="structec__fsm__sii.html">ec_fsm_sii_t</a> <a class="code" href="structec__fsm__master.html#aeac629d016ca18930554d88646b1516f">fsm_sii</a>; </div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;};</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;<span class="keywordtype">void</span> <a class="code" href="fsm__master_8h.html#ac522240017742f5ce6f6e6099a4d55c6">ec_fsm_master_init</a>(<a class="code" href="structec__fsm__master.html">ec_fsm_master_t</a> *, <a class="code" href="structec__master.html">ec_master_t</a> *, <a class="code" href="structec__datagram__t.html">ec_datagram_t</a> *);</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;<span class="keywordtype">void</span> <a class="code" href="fsm__master_8h.html#aab6e3a8172db55802b1ebb309a308574">ec_fsm_master_clear</a>(<a class="code" href="structec__fsm__master.html">ec_fsm_master_t</a> *);</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;<span class="keywordtype">void</span> <a class="code" href="fsm__master_8h.html#a8a4cf483cc0f32ade4601009604a70ce">ec_fsm_master_reset</a>(<a class="code" href="structec__fsm__master.html">ec_fsm_master_t</a> *);</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="keywordtype">int</span> <a class="code" href="fsm__master_8h.html#aef7063fd815224264557e936f96d8844">ec_fsm_master_exec</a>(<a class="code" href="structec__fsm__master.html">ec_fsm_master_t</a> *);</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="keywordtype">int</span> <a class="code" href="fsm__master_8h.html#af02432232f46f496f90d376082717440">ec_fsm_master_idle</a>(<span class="keyword">const</span> <a class="code" href="structec__fsm__master.html">ec_fsm_master_t</a> *);</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="structec__fsm__soe_html"><div class="ttname"><a href="structec__fsm__soe.html">ec_fsm_soe</a></div><div class="ttdoc">Finite state machines for the Sercos over EtherCAT protocol. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__soe_8h_source.html#l00051">fsm_soe.h:51</a></div></div>
<div class="ttc" id="structec__sii__write__request__t_html_a9b70af97dacc5056389bcde6ac1cf107"><div class="ttname"><a href="structec__sii__write__request__t.html#a9b70af97dacc5056389bcde6ac1cf107">ec_sii_write_request_t::offset</a></div><div class="ttdeci">uint16_t offset</div><div class="ttdoc">SII word offset. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00056">fsm_master.h:56</a></div></div>
<div class="ttc" id="structec__fsm__master_html_a518334a40bb6eeea55081a997bbaebc2"><div class="ttname"><a href="structec__fsm__master.html#a518334a40bb6eeea55081a997bbaebc2">ec_fsm_master::datagram</a></div><div class="ttdeci">ec_datagram_t * datagram</div><div class="ttdoc">datagram used in the state machine </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00070">fsm_master.h:70</a></div></div>
<div class="ttc" id="fsm__master_8h_html_aab6e3a8172db55802b1ebb309a308574"><div class="ttname"><a href="fsm__master_8h.html#aab6e3a8172db55802b1ebb309a308574">ec_fsm_master_clear</a></div><div class="ttdeci">void ec_fsm_master_clear(ec_fsm_master_t *)</div><div class="ttdoc">Destructor. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8c_source.html#l00103">fsm_master.c:103</a></div></div>
<div class="ttc" id="structec__fsm__master_html_a0e8413b9433f4223911da952e2e26a7a"><div class="ttname"><a href="structec__fsm__master.html#a0e8413b9433f4223911da952e2e26a7a">ec_fsm_master::sii_request</a></div><div class="ttdeci">ec_sii_write_request_t * sii_request</div><div class="ttdoc">SII write request. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00088">fsm_master.h:88</a></div></div>
<div class="ttc" id="structec__fsm__master_html_acab91592f35788b01419702634765b86"><div class="ttname"><a href="structec__fsm__master.html#acab91592f35788b01419702634765b86">ec_fsm_master::fsm_soe</a></div><div class="ttdeci">ec_fsm_soe_t fsm_soe</div><div class="ttdoc">SoE state machine. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00093">fsm_master.h:93</a></div></div>
<div class="ttc" id="structec__fsm__master_html_a93359faa0215a9448d5663a09f319372"><div class="ttname"><a href="structec__fsm__master.html#a93359faa0215a9448d5663a09f319372">ec_fsm_master::fsm_pdo</a></div><div class="ttdeci">ec_fsm_pdo_t fsm_pdo</div><div class="ttdoc">PDO configuration state machine. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00094">fsm_master.h:94</a></div></div>
<div class="ttc" id="structec__fsm__master_html"><div class="ttname"><a href="structec__fsm__master.html">ec_fsm_master</a></div><div class="ttdoc">Finite state machine of an EtherCAT master. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00068">fsm_master.h:68</a></div></div>
<div class="ttc" id="structec__sii__write__request__t_html_a4751ad577cec3bff18f540147a8e7ca0"><div class="ttname"><a href="structec__sii__write__request__t.html#a4751ad577cec3bff18f540147a8e7ca0">ec_sii_write_request_t::state</a></div><div class="ttdeci">ec_internal_request_state_t state</div><div class="ttdoc">State of the request. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00059">fsm_master.h:59</a></div></div>
<div class="ttc" id="structec__fsm__master_html_a0e6fafb6571a8c72ef75d37b335f168c"><div class="ttname"><a href="structec__fsm__master.html#a0e6fafb6571a8c72ef75d37b335f168c">ec_fsm_master::slaves_responding</a></div><div class="ttdeci">unsigned int slaves_responding[EC_MAX_NUM_DEVICES]</div><div class="ttdoc">Number of responding slaves for every device. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00080">fsm_master.h:80</a></div></div>
<div class="ttc" id="structec__sdo__request_html"><div class="ttname"><a href="structec__sdo__request.html">ec_sdo_request</a></div><div class="ttdoc">CANopen SDO request. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8h_source.html#l00048">sdo_request.h:48</a></div></div>
<div class="ttc" id="structec__fsm__sii_html"><div class="ttname"><a href="structec__fsm__sii.html">ec_fsm_sii</a></div><div class="ttdoc">Slave information interface FSM. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__sii_8h_source.html#l00061">fsm_sii.h:61</a></div></div>
<div class="ttc" id="structec__fsm__master_html_a2f5af7218647e9b14813f1033f8fc91a"><div class="ttname"><a href="structec__fsm__master.html#a2f5af7218647e9b14813f1033f8fc91a">ec_fsm_master::state</a></div><div class="ttdeci">void(* state)(ec_fsm_master_t *)</div><div class="ttdoc">master state function </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00073">fsm_master.h:73</a></div></div>
<div class="ttc" id="structec__sii__write__request__t_html_a98d3bd46058ea045c94f6f32d0b01d62"><div class="ttname"><a href="structec__sii__write__request__t.html#a98d3bd46058ea045c94f6f32d0b01d62">ec_sii_write_request_t::nwords</a></div><div class="ttdeci">size_t nwords</div><div class="ttdoc">Number of words. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00057">fsm_master.h:57</a></div></div>
<div class="ttc" id="structec__fsm__master_html_a173d3201cbfb35d29ff02788d7396839"><div class="ttname"><a href="structec__fsm__master.html#a173d3201cbfb35d29ff02788d7396839">ec_fsm_master::rescan_required</a></div><div class="ttdeci">unsigned int rescan_required</div><div class="ttdoc">A bus rescan is required. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00083">fsm_master.h:83</a></div></div>
<div class="ttc" id="structec__datagram__t_html"><div class="ttname"><a href="structec__datagram__t.html">ec_datagram_t</a></div><div class="ttdoc">EtherCAT datagram. </div><div class="ttdef"><b>Definition:</b> <a href="datagram_8h_source.html#l00087">datagram.h:87</a></div></div>
<div class="ttc" id="fsm__pdo_8h_html"><div class="ttname"><a href="fsm__pdo_8h.html">fsm_pdo.h</a></div><div class="ttdoc">EtherCAT PDO configuration state machine structures. </div></div>
<div class="ttc" id="structec__fsm__master_html_a76906b5cbaec1d07e5881738a6ce008e"><div class="ttname"><a href="structec__fsm__master.html#a76906b5cbaec1d07e5881738a6ce008e">ec_fsm_master::slave_states</a></div><div class="ttdeci">ec_slave_state_t slave_states[EC_MAX_NUM_DEVICES]</div><div class="ttdoc">AL states of responding slaves for every device. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00084">fsm_master.h:84</a></div></div>
<div class="ttc" id="fsm__slave__scan_8h_html"><div class="ttname"><a href="fsm__slave__scan_8h.html">fsm_slave_scan.h</a></div><div class="ttdoc">EtherCAT slave scanning state machine. </div></div>
<div class="ttc" id="structec__sii__write__request__t_html"><div class="ttname"><a href="structec__sii__write__request__t.html">ec_sii_write_request_t</a></div><div class="ttdoc">SII write request. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00053">fsm_master.h:53</a></div></div>
<div class="ttc" id="fsm__master_8h_html_af02432232f46f496f90d376082717440"><div class="ttname"><a href="fsm__master_8h.html#af02432232f46f496f90d376082717440">ec_fsm_master_idle</a></div><div class="ttdeci">int ec_fsm_master_idle(const ec_fsm_master_t *)</div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8c_source.html#l00169">fsm_master.c:169</a></div></div>
<div class="ttc" id="globals_8h_html"><div class="ttname"><a href="globals_8h.html">globals.h</a></div><div class="ttdoc">Global definitions and macros. </div></div>
<div class="ttc" id="globals_8h_html_af8e216ffa0b8f5e3ee20edd4c17d6174"><div class="ttname"><a href="globals_8h.html#af8e216ffa0b8f5e3ee20edd4c17d6174">ec_internal_request_state_t</a></div><div class="ttdeci">ec_internal_request_state_t</div><div class="ttdoc">Generic request state. </div><div class="ttdef"><b>Definition:</b> <a href="globals_8h_source.html#l00290">globals.h:290</a></div></div>
<div class="ttc" id="fsm__master_8h_html_aef7063fd815224264557e936f96d8844"><div class="ttname"><a href="fsm__master_8h.html#aef7063fd815224264557e936f96d8844">ec_fsm_master_exec</a></div><div class="ttdeci">int ec_fsm_master_exec(ec_fsm_master_t *)</div><div class="ttdoc">Executes the current state of the state machine. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8c_source.html#l00150">fsm_master.c:150</a></div></div>
<div class="ttc" id="structec__sii__write__request__t_html_a1fb11a824ca776c9725157703c64a351"><div class="ttname"><a href="structec__sii__write__request__t.html#a1fb11a824ca776c9725157703c64a351">ec_sii_write_request_t::slave</a></div><div class="ttdeci">ec_slave_t * slave</div><div class="ttdoc">EtherCAT slave. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00055">fsm_master.h:55</a></div></div>
<div class="ttc" id="fsm__master_8h_html_ac522240017742f5ce6f6e6099a4d55c6"><div class="ttname"><a href="fsm__master_8h.html#ac522240017742f5ce6f6e6099a4d55c6">ec_fsm_master_init</a></div><div class="ttdeci">void ec_fsm_master_init(ec_fsm_master_t *, ec_master_t *, ec_datagram_t *)</div><div class="ttdoc">Constructor. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8c_source.html#l00076">fsm_master.c:76</a></div></div>
<div class="ttc" id="structec__slave_html"><div class="ttname"><a href="structec__slave.html">ec_slave</a></div><div class="ttdoc">EtherCAT slave. </div><div class="ttdef"><b>Definition:</b> <a href="slave_8h_source.html#l00176">slave.h:176</a></div></div>
<div class="ttc" id="fsm__slave__config_8h_html"><div class="ttname"><a href="fsm__slave__config_8h.html">fsm_slave_config.h</a></div><div class="ttdoc">EtherCAT slave configuration state machine. </div></div>
<div class="ttc" id="structec__fsm__master_html_aeac629d016ca18930554d88646b1516f"><div class="ttname"><a href="structec__fsm__master.html#aeac629d016ca18930554d88646b1516f">ec_fsm_master::fsm_sii</a></div><div class="ttdeci">ec_fsm_sii_t fsm_sii</div><div class="ttdoc">SII state machine. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00098">fsm_master.h:98</a></div></div>
<div class="ttc" id="structec__fsm__master_html_aeac9947df44bf439f0e1f2b1c1b7b33f"><div class="ttname"><a href="structec__fsm__master.html#aeac9947df44bf439f0e1f2b1c1b7b33f">ec_fsm_master::fsm_slave_scan</a></div><div class="ttdeci">ec_fsm_slave_scan_t fsm_slave_scan</div><div class="ttdoc">slave state machine </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00097">fsm_master.h:97</a></div></div>
<div class="ttc" id="sdo__request_8h_html"><div class="ttname"><a href="sdo__request_8h.html">sdo_request.h</a></div><div class="ttdoc">EtherCAT CANopen SDO request structure. </div></div>
<div class="ttc" id="structec__fsm__master_html_a4d4e15f7b94cd12a63a7450db070840b"><div class="ttname"><a href="structec__fsm__master.html#a4d4e15f7b94cd12a63a7450db070840b">ec_fsm_master::sdo_request</a></div><div class="ttdeci">ec_sdo_request_t * sdo_request</div><div class="ttdoc">SDO request to process. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00090">fsm_master.h:90</a></div></div>
<div class="ttc" id="globals_8h_html_ad1a2101422888687598d7e1a630c6343"><div class="ttname"><a href="globals_8h.html#ad1a2101422888687598d7e1a630c6343">ec_device_index_t</a></div><div class="ttdeci">ec_device_index_t</div><div class="ttdoc">Master devices. </div><div class="ttdef"><b>Definition:</b> <a href="globals_8h_source.html#l00201">globals.h:201</a></div></div>
<div class="ttc" id="structec__fsm__master_html_acf6f1bd6e82f2947e181ed23f9d5f6f9"><div class="ttname"><a href="structec__fsm__master.html#acf6f1bd6e82f2947e181ed23f9d5f6f9">ec_fsm_master::scan_jiffies</a></div><div class="ttdeci">unsigned long scan_jiffies</div><div class="ttdoc">beginning of slave scanning </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00077">fsm_master.h:77</a></div></div>
<div class="ttc" id="foe__request_8h_html"><div class="ttname"><a href="foe__request_8h.html">foe_request.h</a></div><div class="ttdoc">EtherCAT FoE request structure. </div></div>
<div class="ttc" id="structec__fsm__slave__scan_html"><div class="ttname"><a href="structec__fsm__slave__scan.html">ec_fsm_slave_scan</a></div><div class="ttdoc">Finite state machine for scanning an EtherCAT slave. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__slave__scan_8h_source.html#l00055">fsm_slave_scan.h:55</a></div></div>
<div class="ttc" id="globals_8h_html_a0e9c38c7520909d649fac451046dcde0"><div class="ttname"><a href="globals_8h.html#a0e9c38c7520909d649fac451046dcde0">ec_slave_state_t</a></div><div class="ttdeci">ec_slave_state_t</div><div class="ttdoc">State of an EtherCAT slave. </div><div class="ttdef"><b>Definition:</b> <a href="globals_8h_source.html#l00127">globals.h:127</a></div></div>
<div class="ttc" id="datagram_8h_html"><div class="ttname"><a href="datagram_8h.html">datagram.h</a></div><div class="ttdoc">EtherCAT datagram structure. </div></div>
<div class="ttc" id="structec__fsm__pdo_html"><div class="ttname"><a href="structec__fsm__pdo.html">ec_fsm_pdo</a></div><div class="ttdoc">PDO configuration state machine. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__pdo_8h_source.html#l00054">fsm_pdo.h:54</a></div></div>
<div class="ttc" id="fsm__master_8h_html_a8a4cf483cc0f32ade4601009604a70ce"><div class="ttname"><a href="fsm__master_8h.html#a8a4cf483cc0f32ade4601009604a70ce">ec_fsm_master_reset</a></div><div class="ttdeci">void ec_fsm_master_reset(ec_fsm_master_t *)</div><div class="ttdoc">Reset state machine. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8c_source.html#l00121">fsm_master.c:121</a></div></div>
<div class="ttc" id="structec__fsm__master_html_aa06626b21389030366d7aed5f525c6c0"><div class="ttname"><a href="structec__fsm__master.html#aa06626b21389030366d7aed5f525c6c0">ec_fsm_master::idle</a></div><div class="ttdeci">int idle</div><div class="ttdoc">state machine is in idle phase </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00076">fsm_master.h:76</a></div></div>
<div class="ttc" id="structec__fsm__master_html_acd8d73f9c016a18c19eb120f8d691c62"><div class="ttname"><a href="structec__fsm__master.html#acd8d73f9c016a18c19eb120f8d691c62">ec_fsm_master::fsm_slave_config</a></div><div class="ttdeci">ec_fsm_slave_config_t fsm_slave_config</div><div class="ttdoc">slave state machine </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00096">fsm_master.h:96</a></div></div>
<div class="ttc" id="structec__fsm__slave__config_html"><div class="ttname"><a href="structec__fsm__slave__config.html">ec_fsm_slave_config</a></div><div class="ttdoc">Finite state machine to configure an EtherCAT slave. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__slave__config_8h_source.html#l00054">fsm_slave_config.h:54</a></div></div>
<div class="ttc" id="structec__fsm__master_html_af5597239477f215c744aad387d7baa6b"><div class="ttname"><a href="structec__fsm__master.html#af5597239477f215c744aad387d7baa6b">ec_fsm_master::master</a></div><div class="ttdeci">ec_master_t * master</div><div class="ttdoc">master the FSM runs on </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00069">fsm_master.h:69</a></div></div>
<div class="ttc" id="structec__fsm__master_html_a6dea4cfd065a817b358441748378bd14"><div class="ttname"><a href="structec__fsm__master.html#a6dea4cfd065a817b358441748378bd14">ec_fsm_master::retries</a></div><div class="ttdeci">unsigned int retries</div><div class="ttdoc">retries on datagram timeout. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00071">fsm_master.h:71</a></div></div>
<div class="ttc" id="soe__request_8h_html"><div class="ttname"><a href="soe__request_8h.html">soe_request.h</a></div><div class="ttdoc">EtherCAT SoE request structure. </div></div>
<div class="ttc" id="structec__fsm__master_html_aaa3d10bbf5af6278cec37fcd7b771372"><div class="ttname"><a href="structec__fsm__master.html#aaa3d10bbf5af6278cec37fcd7b771372">ec_fsm_master::slave</a></div><div class="ttdeci">ec_slave_t * slave</div><div class="ttdoc">current slave </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00087">fsm_master.h:87</a></div></div>
<div class="ttc" id="structec__fsm__master_html_a64f30f383522a78b12151f803f39c552"><div class="ttname"><a href="structec__fsm__master.html#a64f30f383522a78b12151f803f39c552">ec_fsm_master::fsm_change</a></div><div class="ttdeci">ec_fsm_change_t fsm_change</div><div class="ttdoc">State change state machine. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00095">fsm_master.h:95</a></div></div>
<div class="ttc" id="structec__fsm__master_html_ad9050cec0823e4e0f4ac34effddd8d21"><div class="ttname"><a href="structec__fsm__master.html#ad9050cec0823e4e0f4ac34effddd8d21">ec_fsm_master::sii_index</a></div><div class="ttdeci">off_t sii_index</div><div class="ttdoc">index to SII write request data </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00089">fsm_master.h:89</a></div></div>
<div class="ttc" id="structec__master_html"><div class="ttname"><a href="structec__master.html">ec_master</a></div><div class="ttdoc">EtherCAT master. </div><div class="ttdef"><b>Definition:</b> <a href="master_8h_source.html#l00194">master.h:194</a></div></div>
<div class="ttc" id="structec__fsm__master_html_ab57f14b0c615bae6428ff89ef2cb7ef0"><div class="ttname"><a href="structec__fsm__master.html#ab57f14b0c615bae6428ff89ef2cb7ef0">ec_fsm_master::dev_idx</a></div><div class="ttdeci">ec_device_index_t dev_idx</div><div class="ttdoc">Current device index (for scanning etc.). </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00074">fsm_master.h:74</a></div></div>
<div class="ttc" id="structec__sii__write__request__t_html_a8a435488d56415ece3c1c531bf9712bf"><div class="ttname"><a href="structec__sii__write__request__t.html#a8a435488d56415ece3c1c531bf9712bf">ec_sii_write_request_t::words</a></div><div class="ttdeci">const uint16_t * words</div><div class="ttdoc">Pointer to the data words. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00058">fsm_master.h:58</a></div></div>
<div class="ttc" id="structec__fsm__change_html"><div class="ttname"><a href="structec__fsm__change.html">ec_fsm_change</a></div><div class="ttdoc">EtherCAT state change FSM. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__change_8h_source.html#l00064">fsm_change.h:64</a></div></div>
<div class="ttc" id="structec__fsm__master_html_a6b0de3d8e619c6937679b6e746dd3c1f"><div class="ttname"><a href="structec__fsm__master.html#a6b0de3d8e619c6937679b6e746dd3c1f">ec_fsm_master::link_state</a></div><div class="ttdeci">uint8_t link_state[EC_MAX_NUM_DEVICES]</div><div class="ttdoc">Last link state for every device. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00078">fsm_master.h:78</a></div></div>
<div class="ttc" id="structec__fsm__master_html_a2bc8d2dd67be1dbddac6c20190e3632c"><div class="ttname"><a href="structec__fsm__master.html#a2bc8d2dd67be1dbddac6c20190e3632c">ec_fsm_master::fsm_coe</a></div><div class="ttdeci">ec_fsm_coe_t fsm_coe</div><div class="ttdoc">CoE state machine. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__master_8h_source.html#l00092">fsm_master.h:92</a></div></div>
<div class="ttc" id="structec__fsm__coe_html"><div class="ttname"><a href="structec__fsm__coe.html">ec_fsm_coe</a></div><div class="ttdoc">Finite state machines for the CANopen over EtherCAT protocol. </div><div class="ttdef"><b>Definition:</b> <a href="fsm__coe_8h_source.html#l00052">fsm_coe.h:52</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_c1346cf4828efdd0d2baf0d391d01b77.html">master</a></li><li class="navelem"><a class="el" href="fsm__master_8h.html">fsm_master.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
